<!DOCTYPE html>
<html>
<head lang="en">
    <meta charset="UTF-8">
    <title>截取字符串</title>
</head>
<body>


<!--
<textarea name="" id="dfdfdsf" cols="30" rows="10">

</textarea>
-->


<div id="textarea" style="border: 1px solid #ccc;border-radius:5px; width: 400px;height:94px">2342432432</div>
<script>
//    var str="<ul><li>"+1+"</li><li>"+2+"</li></ul>";
    var str="<strong>设置标签的html内容</strong>";
    var textarea=document.getElementById("textarea");

    textarea.innerHTML=str;
//    textarea.innerText=str;



    function getDocumentsList(){
        var str='a[{"fileName":"2.txt","path":"http://file-10014011.file.myqcloud.com/201608/1470904272342.txt"},{"fileName":"3.txt","path":"http://file-10014011.file.myqcloud.com/201608/1470904272342.txt"}]';

        return JSON.parse(str.substr(1));
    }
//    console.log(" getDocumentsList();"+ getDocumentsList());

</script>

</body>
</html>